﻿using System.Diagnostics;
using System.Windows;

namespace Hibiku
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : Application
    {
        private void Application_DispatcherUnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e)
        {
            Trace.Fail(e.Exception.Message, e.Exception.StackTrace);

            MessageBox.Show(e.Exception.Message, "Application Error", MessageBoxButton.OK, MessageBoxImage.Error);

            Shutdown(-1);

            e.Handled = true;
        }
    }
}
